package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * Created by ChenYong on 2017-04-13.
 * <br>
 * 题目列表的请求参数。
 */
public class LoginUserListParam extends Page2Param {
    /**
     * 行业代码
     */
    @Pattern(regexp = Constants.INDUSTRY_CODE_EMPTY_RE, message = Constants.INDUSTRY_CODE_RE_MSG)
    private String industryCode;
    /**
     * 姓名
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_50, message = "姓名的长度在0至50个字之间")
    private String loginName;
    /**
     * 用户类型
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_1, message = "用户类型的长度在0至1之间")
    @Pattern(regexp = Constants.NUMBER_EMPTY_RE, message = ("用户类型" + Constants.NUMBER_RE_MSG))
    private String isAdmin;
    /**
     * 是否为领导
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_1, message = "是否为领导的长度在0至1之间")
    @Pattern(regexp = Constants.NUMBER_EMPTY_RE, message = ("是否为领导" + Constants.NUMBER_RE_MSG))
    private String isLeader;

    /**
     * 默认构造器。
     */
    public LoginUserListParam() {
        super();
    }

    public String getIndustryCode() {
        return industryCode;
    }

    public void setIndustryCode(String industryCode) {
        this.industryCode = industryCode;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(String isAdmin) {
        this.isAdmin = isAdmin;
    }

    public String getIsLeader() {
        return isLeader;
    }

    public void setIsLeader(String isLeader) {
        this.isLeader = isLeader;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("LoginUserListParam{");
        sb.append("startDate='").append(startDate).append('\'');
        sb.append(", iDisplayStart=").append(iDisplayStart);
        sb.append(", industryCode='").append(industryCode).append('\'');
        sb.append(", sEcho=").append(sEcho);
        sb.append(", endDate='").append(endDate).append('\'');
        sb.append(", loginName='").append(loginName).append('\'');
        sb.append(", iDisplayLength=").append(iDisplayLength);
        sb.append(", iColumns=").append(iColumns);
        sb.append(", iSortingCols=").append(iSortingCols);
        sb.append(", isAdmin='").append(isAdmin).append('\'');
        sb.append(", isLeader='").append(isLeader).append('\'');
        sb.append('}');
        return sb.toString();
    }
}